package com.cmc.cloud.cmclink.doc.api.document.req.so;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 订舱联系人信息 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SoContactBaseDto {

    @Schema(description = "外键", requiredMode = Schema.RequiredMode.REQUIRED, example = "29008")
    private Long soId;

    @Schema(description = "联系人类型 发货人 收货人", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotBlank(message = "联系人类型 发货人 收货人不能为空")
    @Length(max = 50, message = "联系人类型 发货人 收货人支持最大长度{max}")
    private String contactType;

    @Schema(description = "联系人名", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "联系人名不能为空")
    @Length(max = 50, message = "联系人名支持最大长度{max}")
    private String contactPerson;

    @Schema(description = "联系人电话", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "联系人电话不能为空")
    @Length(max = 50, message = "联系人电话支持最大长度{max}")
    private String contactTelephone;

    @Schema(description = "联系人邮箱")
    @Length(max = 50, message = "联系人邮箱支持最大长度{max}")
    private String contactEmail;

    @Schema(description = "联系人地址")
    @Length(max = 50, message = "联系人地址支持最大长度{max}")
    private String contactAddress;

    @Schema(description = "联系人传真")
    @Length(max = 50, message = "联系人传真支持最大长度{max}")
    private String contactFax;

    @Schema(description = "创建人id")
    @NotBlank(message = "创建人不允许为空")
    private String creator;

}
